import { munus } from '@/router/menu'

interface IState {
  menuList: Array<{}>
  [key: string]: any
}

const state: IState = {
  menuList: munus
}

const mutations = {
  SET_MENULIST: (state: IState, list: []) => {
    state.menuList = list
  }
}

const actions = {
  setMenu({ commit }: any, list: []) {
    commit('SET_MENULIST', list)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
